package xscscscc;

public class example01 {
    public static void main (String[] args) throws Exception{
        //创建一个空间字符串
        String str1 = new String();
        // 创建一个内容为abcd的字符串
        String str2 = new String("abcd");
        //创建一个内容为字符数组的字符串
        char[] charArray = new char[] {'d','e','f'};
        String str3 = new String(charArray);
        //创建一个内容为字节数组的字符串
        byte[] arr = {97,98,99};
        String str4 = new String(arr);
        System.out.println("a" + str1 + "b");
        System.out.println(str2);
        System.out.println(str3);
        System.out.println(str4);
    }
}